Concurrent programs are programs where there are multiple threads that are executing simultaneously. For example, for a computer having a single microprocessor, a scheduler of the computer operating system multiplexes multiple programs running simultaneously on the microprocessor. In multiprocessor systems, the operating system multiplexes multiple programs running simultaneously on each of the multiple processors. As a result, it is likely that more than one of such programs use common variables. For example, if a computer processor is running an e-mail program, a text messaging program, and a voice-mail messaging program, each of these programs refers to a variable denoting the total number of messages, including e-mail messages, text message, and voice-mail messages.
Generally, computer programs use assertion constructs for checking programmer assumptions at various points in the program. For example, an e-mail program running on a computer uses an assertion to ascertain that the value of the variable for the total number of messages received by the computer system is greater than or equal to the variable for the number of unread messages. However, when multiple threads are running concurrently, such an assertion checking the number of messages in one thread may fail in some circumstances due to the change in the value of the variables used in the assertion by other concurrent threads. In some circumstances this results in spurious failure of the assertion.